package com.wulinbus.dao.script;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wulinbus.model.RemitOrderModel;
import com.wulinbus.model.ScriptModel;
import com.wulinbus.model.ScriptOwnModel;

public interface ScriptDAO {

	public void addScript(ScriptModel scriptModel);

	public ScriptModel findScriptBySid(@Param("sid") Integer sid);

	public List<ScriptModel> findListByUid(@Param("uid") Integer uid);

	public void addOwnScript(ScriptOwnModel scriptOwnModel);

	public void plusAttributeCount(@Param("sid") Integer sid);

	public List<ScriptModel> getScriptList(@Param("keyword") String keyword,@Param("start") Integer start,
		@Param("pageSize") Integer pageSize);

	public Integer count(@Param("keyword") String keyword);

	public List<ScriptModel> getScriptListTimeDown(@Param("start")	Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListTimeUp(@Param("start")  Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptOwnModel> getAttributeList(@Param("sid") Integer sid,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public Integer attributeCount();

	public Integer attributeCount(@Param("sid") Integer sid);

	public List<ScriptModel> getScriptListRemainingTimeDown(@Param("start")	Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListRemainingTimeUp(@Param("start")	Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListParticipateCountDown(@Param("start")	Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListParticipateCountUp(@Param("start")	Integer start, @Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListAmountDown(@Param("amount_b") Integer amount_b,@Param("amount_e") Integer amount_e,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListAmountUp(@Param("amount_b") Integer amount_b,@Param("amount_e") Integer amount_e,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public ScriptOwnModel findScriptOwnByOwnSid(@Param("own_sid") Integer own_sid);

	public List<ScriptOwnModel> findOrderScriptOwnListByUid(@Param("uid") Integer uid);

	public List<ScriptOwnModel> findScriptOwnListByUid(@Param("uid") Integer uid,
			@Param("start")	Integer start,@Param("pageSize") Integer pageSize);

	public Integer attributeCountByUid(@Param("uid") Integer uid);

	public void like(@Param("own_sid") Integer own_sid);

	public List<ScriptOwnModel> getScriptOwnListOrderLike(@Param("count") Integer count);

	public List<ScriptModel> getScriptListByUid(@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public List<ScriptModel> getScriptListByUid(@Param("uid") Integer uid,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public Integer countByUid(@Param ("uid")Integer uid);
	
	public Integer addViewNums(@Param ("own_sid")Integer own_sid);

	public List<ScriptOwnModel> getScriptAttributeListByUid(@Param("uid") Integer uid,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public Integer addLike(@Param ("uid")Integer uid,@Param ("own_sid")Integer own_sid);
	
	public Integer getLike(@Param ("uid")Integer uid,@Param ("own_sid")Integer own_sid);
	
	public Integer countAttributeByUid(@Param ("uid") Integer uid);

	public void editorScript(ScriptModel scriptModel);

	public List<ScriptModel> getScriptListBySids(List<Integer> sids);

	public void editorOwnScript(ScriptOwnModel scriptOwnModel);

	public List<ScriptModel> getAllScriptList();

	public List<ScriptModel> getMaxAttributeScriptList();

	public Integer delete(@Param ("sid") Integer sid);

	public List<ScriptOwnModel> getScriptOwnList(@Param ("keyword") String keyword,@Param ("start") Integer start,@Param ("pageSize") Integer pageSize);

	public Integer ScriptOwnCount(@Param ("keyword") String keyword);

	public Integer attributeDelete(@Param ("own_sid") Integer own_sid);

	public List<ScriptModel> getCurrentTimeScriptList(@Param ("systemDate") String systemDate);

	public ScriptOwnModel getWinnerModel(@Param ("sid") Integer sid);


}
